package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysQuarterlyMapper;
import com.ruoyi.system.domain.SysQuarterly;
import com.ruoyi.system.service.ISysQuarterlyService;

/**
 * 季刊内容Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-29
 */
@Service
public class SysQuarterlyServiceImpl implements ISysQuarterlyService 
{
    @Autowired
    private SysQuarterlyMapper sysQuarterlyMapper;

    /**
     * 查询季刊内容
     * 
     * @param quarterlyId 季刊内容主键
     * @return 季刊内容
     */
    @Override
    public SysQuarterly selectSysQuarterlyByQuarterlyId(Long quarterlyId)
    {
        return sysQuarterlyMapper.selectSysQuarterlyByQuarterlyId(quarterlyId);
    }

    /**
     * 查询季刊内容列表
     * 
     * @param sysQuarterly 季刊内容
     * @return 季刊内容
     */
    @Override
    public List<SysQuarterly> selectSysQuarterlyList(SysQuarterly sysQuarterly)
    {
        return sysQuarterlyMapper.selectSysQuarterlyList(sysQuarterly);
    }

    /**
     * 新增季刊内容
     * 
     * @param sysQuarterly 季刊内容
     * @return 结果
     */
    @Override
    public int insertSysQuarterly(SysQuarterly sysQuarterly)
    {
        sysQuarterly.setCreateTime(DateUtils.getNowDate());
        return sysQuarterlyMapper.insertSysQuarterly(sysQuarterly);
    }

    /**
     * 修改季刊内容
     * 
     * @param sysQuarterly 季刊内容
     * @return 结果
     */
    @Override
    public int updateSysQuarterly(SysQuarterly sysQuarterly)
    {
        sysQuarterly.setUpdateTime(DateUtils.getNowDate());
        return sysQuarterlyMapper.updateSysQuarterly(sysQuarterly);
    }

    /**
     * 批量删除季刊内容
     * 
     * @param quarterlyIds 需要删除的季刊内容主键
     * @return 结果
     */
    @Override
    public int deleteSysQuarterlyByQuarterlyIds(Long[] quarterlyIds)
    {
        return sysQuarterlyMapper.deleteSysQuarterlyByQuarterlyIds(quarterlyIds);
    }

    /**
     * 删除季刊内容信息
     * 
     * @param quarterlyId 季刊内容主键
     * @return 结果
     */
    @Override
    public int deleteSysQuarterlyByQuarterlyId(Long quarterlyId)
    {
        return sysQuarterlyMapper.deleteSysQuarterlyByQuarterlyId(quarterlyId);
    }
}
